<?php


/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Gmap
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */
 
 
?>

<?php 

$user = $this->gmap->getOwner();

$content_photo = $this->htmlLink($user->getHref(), $this->itemPhoto($user, 'thumb.icon'));

$content_creation_date = $this->timestamp(strtotime($this->gmap->creation_date));

$content_comments = $this->translate(array("%s comment", "%s comments", $this->gmap->comment_count), $this->gmap->comment_count);
$content_views = $this->translate(array("%s view", "%s views", $this->gmap->view_count), $this->gmap->view_count);

$location_text = Engine_Api::_()->getApi('settings', 'core')->getSetting('gmap.standardizeaddress', 0) ? $this->gmap->formatted_address : $this->gmap->location;
$location_text = $this->gmap->location;

?>

<div class="gmap_infowindow_pop">
  <div class="gmap_infowindow_pop_title"><?php echo $this->htmlLink($user->getHref(), $user->getTitle(), array('class'=>"gmap_title")) ?></div>
  <div class="gmap_infowindow_pop_address"><?php echo $location_text; ?></div>
  <div class="gmap_infowindow_pop_photo"><?php echo $content_photo; ?></div>
  <div class="gmap_infowindow_pop_meta">
    <span class="gmap_infowindow_pop_meta_owner"><?php echo $this->gmap->__toString(); ?></span>
    <span class="gmap_infowindow_pop_meta_date"><?php echo $content_creation_date; ?></span>
    <span class="gmap_infowindow_pop_meta_stat"><?php echo $content_comments; ?> | <?php echo $content_views; ?></span>
  </div>
</div>
